let program = require('commander')
 
program
    .version('1.0.0')
    .option('-C, --chdir <path>', 'payload file directory')
    .option('-c, --configdir <path>', 'config file directory')
    .option('-i, --integer <n>', 'output information level(1 | 2)', parseInt)
    .option('-o, --order', 'exec in order')
    .parse(process.argv)

module.exports = {
    loadPath: program.chdir ? program.chdir : './payload.sh',
    configPath: program.configdir ? program.configdir  : './config.json',
    level: program.integer ? program.integer : 1,
    order: program.order ? true : false
}

if (require.main === module) {
    console.log(program.chdir)
}